Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 681efb422de78f9e2005f98141a78c8ceb146b43


Parents : 8ef9e55
Author : Mark Qvist <mark@unsigned.io>
Date : 2022-06-30T13:51:46+02:00

Prepared for 128-bit destinations

Changes

1 files changed, 2 insertions(+), 2 deletions(-)


Diff

diff --git a/nomadnet/ui/textui/Browser.py b/nomadnet/ui/textui/Browser.py
index 59578e1..8e40928 100644
--- a/nomadnet/ui/textui/Browser.py
+++ b/nomadnet/ui/textui/Browser.py
@@ -279,7 +279,7 @@ class Browser:
components = url.split(":")
if len(components) == 1:
- if len(components[0]) == 20:
+ if len(components[0]) == (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2:
try:
destination_hash = bytes.fromhex(components[0])
except Exception as e:
@@ -288,7 +288,7 @@ class Browser:
else:
raise ValueError("Malformed URL")
elif len(components) == 2:
- if len(components[0]) == 20:
+ if len(components[0]) == (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2:
try:
destination_hash = bytes.fromhex(components[0])
except Exception as e:


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────